package com.ftg.learn.bus.controller;

import com.ftg.learn.bus.VO.MenuVo;
import com.ftg.learn.bus.entity.LoginUser;
import com.ftg.learn.bus.lnterceptor.LoginInterceptor;
import com.ftg.learn.bus.service.IMenuService;
import com.ftg.learn.bus.service.IUserService;
import com.ftg.learn.util.ResEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Objects;

/**
 * @author Guo
 * @date 2022/3/7
 */
@RestController
@RequestMapping("/bus/login")
@Api(tags = "登录功能模拟")
public class LoginController {

    @Resource
    IUserService iUserService;

    /**
     * 人员登录功能模拟
     *
     * @param account
     * @param password
     * @param req
     * @return
     */
    @PostMapping("/in")
    @ApiOperation(value = "人员登录功能")
    public ResEntity logIn(@RequestParam String account, @RequestParam String password,
                           HttpServletRequest req, HttpServletResponse response) {
        return iUserService.logIn(account, password, req,response);
    }



}
